home *** CD-ROM | disk | FTP | other *** search
/ Sweet! Digizine 1.1 / 6 Sweet! Digizine 1.1 (RETAIL).iso / INSTALL.RUL < prev    next >
Text File  |  1997-05-06  |  6KB  |  263 lines

  1. // Ishield script file for Pocohontas by Pixel Genius
  2. // 6/24/95 modified 10/29/95
  3.  
  4. declare
  5.  
  6.     #define SPACE_NEEDED 3838450
  7.     string szText [ 255 ];
  8.     string szDisk [3];
  9.     string szTemp [255]; 
  10.     string szDefPath [255];
  11.     string szBitmapPath [255];
  12.     string szResultPath [255]; 
  13.     string szResultPathX [255]; 
  14.     string szProgramPath [255]; 
  15.     string szWorkingPath [255];
  16.     string szReadme [255]; 
  17.     string szQtPath [255];
  18.     string szIconPath [ 255 ];
  19.     string szFileName [255];
  20.     string szPathFile [ 255 ];
  21.     number nspace;
  22.     number ntemp;
  23.     number listID;
  24.     number nTextMaxLines;
  25.     number nFontPointSize;
  26.     number nStatusWindowID;
  27.     number nCheck;
  28.  
  29. program
  30. anyword:
  31.     SetColor ( STATUSBAR, RED );
  32.  
  33.     // Blue Gradiant from top to bottom
  34.     SetColor (      BACKGROUND, 
  35.             QUAD( BK_RESET, 0, 0, 0 ) );
  36.     SetColor (      BACKGROUND,
  37.             QUAD( BK_VERT_TOP, 0, 0, 255 ) );
  38.     SetColor (      BACKGROUND,
  39.             QUAD( BK_VERT_BOTTOM, 0, 0, 50 ) );
  40.     SetColor (      BACKGROUND,
  41.             QUAD( BK_COMPLETE, 0, 0, 0 ) );
  42.  
  43.  
  44.     SetFont (FONT_TITLE, STYLE_NORMAL, "System" );
  45.     SetTitle ("Sweet! Digizine Installation Program", 24, BLACK );
  46.  
  47.     // MS look routine
  48.         nTextMaxLines = 3;
  49.         nFontPointSize = 9;
  50.         nStatusWindowID = StatusCreate( STYLE_DEFAULT ,
  51.                         nTextMaxLines ,
  52.                         "System" ,
  53.                         nFontPointSize ,
  54.                         STYLE_NORMAL );
  55.         StatusSelect( nStatusWindowID );
  56.  
  57.     //Enable ( BITMAPFADE );
  58.     Enable ( EXIT );
  59.     Disable ( HELP );
  60.     Disable ( PAUSE );
  61.     Disable ( INFO );
  62.     Enable ( FEEDBACK_OPERATION );
  63.     Enable ( STATUS );
  64.     Enable ( BACKGROUND );
  65.  
  66.     GetDisk( TARGETDIR, szDisk );
  67.     szDefPath = szDisk ^ "SWEET";
  68.  
  69.     SetStatusWindow ( 10, "Installing Sweet! Program" );
  70.  
  71. TargetLocation:
  72.  
  73.     AskPath ( "Please enter the desired location for the Sweet Digizine?", szDefPath, szResultPath );  
  74.  
  75.     if LAST_RESULT = 0 then call ConfirmCancel; 
  76.     endif;
  77.  
  78.     if szResultPath = SRCDIR then 
  79.         MessageBox ( "The target location must be different than the source.  Please specify a different location.", SEVERE );
  80.         goto TargetLocation;
  81.     endif;
  82.  
  83.     CreateDir( szResultPath );
  84.  
  85.  
  86.     // This creates the Xtras folder inside the sweet folder
  87.     szResultPathX = szResultPath ^ "\\XTRAS";
  88.     CreateDir( szResultPathX );
  89.  
  90.     if LAST_RESULT = 0 then goto DirCreated; 
  91.     endif;
  92.  
  93.     MessageBox ( "Unable to create directory.  Please enter a valid path", SEVERE );
  94.     goto TargetLocation;
  95.  
  96.  
  97. DirCreated:
  98.  
  99.     GetDiskSpace ( szResultPath );
  100.  
  101.     if LAST_RESULT < SPACE_NEEDED then
  102.         MessageBox ( "Not enough space on the drive specified.  Try another drive.", SEVERE );
  103.         goto TargetLocation;
  104.     endif;
  105.  
  106.     SetStatusWindow ( 30, "Ready to copy files." );
  107.     TARGETDIR = szResultPath;
  108.      
  109.     SetStatusWindow ( 35, "Installing Sweet program files ..." );
  110.  
  111.  
  112.     // Copy files from cd
  113.     
  114.     //CopyFile ( "FILEIO.DLL", "FILEIO.DLL" );
  115.     CopyFile ( "SWEET.EXE", "SWEET.EXE" );
  116.     CopyFile ( "README.TXT", "README.TXT" );
  117.     CopyFile ( "SWEET.INI", "SWEET.INI" );
  118.     CopyFile ( "SWEET.ICO", "SWEET.ICO" );
  119.     CopyFile ( "README.TXT", "DUMM.TXT" );
  120.     // make files hidden
  121.         // Use List of Files to make hidden
  122.  
  123.     // Create file list
  124.         listID = ListCreate( STRINGLIST );
  125.  
  126.         if ( listID = LIST_NULL ) then
  127.             MessageBox( "List not created, fatal error", SEVERE );
  128.         endif;
  129.  
  130.     // Add elements to file list
  131.         
  132.         ListAddString ( listID, "SWEET.INI", AFTER );
  133.         //ListAddString ( listID, "FILEIO.DLL", AFTER );
  134.         ListAddString ( listID, "SWEET.ICO", AFTER );
  135.         ListAddString ( listID, "DUMM.TXT", AFTER );
  136.  
  137.     //set files in list to hidden
  138.     
  139.         nCheck = ListGetFirstString(    listID,
  140.                         szFileName );
  141.         while ( nCheck = 0 )                    
  142.             szPathFile = szResultPath ^ szFileName;
  143.             SetFileInfo(    szPathFile,
  144.                     FILE_ATTRIBUTE,
  145.                     FILE_ATTR_HIDDEN, 
  146.                     "" );
  147.             nCheck = ListGetNextString (    listID, 
  148.                             szFileName );
  149.         endwhile;
  150.  
  151.     //clears list
  152.         ListDestroy ( listID );
  153.  
  154.  
  155.  
  156.     // This section is for copying the Xtras folder
  157.     TARGETDIR = szResultPathX;
  158.     SetStatusWindow ( 55, "Installing Sweet program files ..." );    
  159.  
  160.  
  161.     // Copy files from cd
  162.     
  163.     //CopyFile ( "QTVRW.QTC", "QTVRW.QTC" );
  164.     CopyFile ( "FILEIO16.X16", "FILEIO16.X16" );
  165.     CopyFile ( "FILEIO.X32", "FILEIO.X32" );
  166.     CopyFile ( "Pomlite.x16", "Pomlite.x16" );
  167.     CopyFile ( "Pomlite.x32", "Pomlite.x32" );
  168.     CopyFile ( "FILESUPT.X16", "FILESUPT.X16" );
  169.     CopyFile ( "FILESUPT.X32", "FILESUPT.X32" );
  170.  
  171.     // make files hidden
  172.         // Use List of Files to make hidden
  173.  
  174.     // Create file list
  175.         listID = ListCreate( STRINGLIST );
  176.  
  177.         if ( listID = LIST_NULL ) then
  178.             MessageBox( "List not created, fatal error", SEVERE );
  179.         endif;
  180.  
  181.     // Add elements to file list Apparently I can╒t hide Xtras without causing an error
  182.         
  183.         //ListAddString ( listID, "QTVRW.QTC", AFTER );
  184.         //ListAddString ( listID, "FILEIO16.X16", AFTER );
  185.         //ListAddString ( listID, "FILEIO.X32", AFTER );
  186.         //ListAddString ( listID, "Pomlite.x16", AFTER );
  187.         //ListAddString ( listID, "Pomlite.x32", AFTER );
  188.  
  189.  
  190.     //set files in list to hidden
  191.     
  192.         nCheck = ListGetFirstString(    listID,
  193.                         szFileName );
  194.         while ( nCheck = 0 )                    
  195.             szPathFile = szResultPathX ^ szFileName;
  196.             SetFileInfo(    szPathFile,
  197.                     FILE_ATTRIBUTE,
  198.                     FILE_ATTR_HIDDEN, 
  199.                     "" );
  200.             nCheck = ListGetNextString (    listID, 
  201.                             szFileName );
  202.         endwhile;
  203.  
  204.     //clears list
  205.         ListDestroy ( listID );
  206.  
  207.  
  208.  
  209.     SetStatusWindow ( 80, "Finished coying files..." );
  210.  
  211.  
  212.  
  213.     //This sets the TARGETDIR  back to the Sweet folder
  214.     TARGETDIR = szResultPath;
  215.  
  216.  
  217.  
  218. //pre-written quick time routine I cannot test
  219.      //Launch QuickTime Installer
  220.       //szQtPath = "D:\\WIndows\\QTW_203\\end_user\\setup.exe";
  221.       szQtPath = SRCDIR; 
  222.       szQtPath = szQtPath ^ "QTW\\QTINSTAL.EXE";
  223.       LaunchAppAndWait ( szQtPath, "", WAIT );
  224.       szQtPath = szQtPath ^ "QTW\\QTVR16.EXE";
  225.       LaunchAppAndWait ( szQtPath, "", WAIT );
  226.  
  227. //pre-written quicktime VR routine I cannot test
  228.  
  229.     SetStatusWindow ( 90, "Creating Program Group..." );
  230.  
  231.  
  232.  
  233.     szProgramPath = TARGETDIR ^ "SWEET.EXE";
  234.     szWorkingPath = TARGETDIR;
  235.     szIconPath    = TARGETDIR ^ "SWEET.EXE";
  236.  
  237.     AddProgItemEx( "SWEET DIGIZINE",
  238.                "SWEET",
  239.                szProgramPath,
  240.                szWorkingPath,
  241.                szIconPath,
  242.                0,
  243.                "",
  244.                0 );
  245.         SetStatusWindow ( 100, "Done installing files ..." );
  246.  
  247. AskYesNo ( "Installation is complete.  Would you like to start the Sweet Digizine?", YES );
  248. if LAST_RESULT = NO then exit;
  249. endif;
  250.   
  251. LaunchApp ( szProgramPath, "" );
  252.  
  253. exit;
  254.  
  255.  
  256.  
  257.  
  258. ConfirmCancel:  
  259. AskYesNo ( "Are you sure you want to CANCEL installation?", NO );
  260.  
  261. if LAST_RESULT = NO then return; endif;
  262. exit;
  263.